<?php

class Admin_m extends CI_Model {

    function __construct() {
        parent::__construct();
        $this->load->database();
    }

    function get_breadcumb($array) {
        $result = '';
        $numItems = count($array);
        $i = 0;
        foreach ($array as $key => $value) {
            if (++$i === $numItems) {
                $result .= $key; 
            }else{
                $result .= '<a href="'.base_url().'admin/'.$value.'">'.$key.'</a><span class="breadcumb_separator">&gt;</span>';
            }
        }
        return $result;
    }

}